import 'dart:io';

import 'package:get/get_rx/src/rx_types/rx_types.dart';
import 'package:image_picker/image_picker.dart';
import 'package:video_compress/video_compress.dart';

class VideoEditState {
  final ImagePicker picker = ImagePicker();

  Rxn<File> originalFileThumbnail = Rxn(null);
  File? originalFile;

  Rxn<File> compressedFileThumbnail = Rxn(null);
  File? compressedFile;

  VideoQuality videoQuality = VideoQuality.DefaultQuality;

  final RxDouble _originalSize = 0.0.obs;

  double get originalSize => _originalSize.value;

  set originalSize(double length) => _originalSize.value = (length / 1000).ceil() / 1000;

  final RxDouble _compressedSize = 0.0.obs;

  double get compressedSize => _compressedSize.value;

  set compressedSize(double length) => _compressedSize.value = (length / 1000).ceil() / 1000;

  VideoEditState() {
    ///Initialize variables
  }
}
